import path from 'node:path'
import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'
import VueRouter from 'unplugin-vue-router/vite'
import {defineConfig} from 'vite'
import Layout from "vite-plugin-vue-layouts";

const RouteGenerateExclude = ['**/components/**', '**/layouts/**', '**/data/**', '**/types/**']

// https://vite.dev/config/
export default defineConfig({
    plugins: [
        VueRouter({
            exclude: RouteGenerateExclude,
            dts: 'typed-router.d.ts',
        }),
        vue(),
        tailwindcss(),
        Layout({
            defaultLayout: 'default'
        })
    ],

    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src'),
        },
    },
})
